class initService {
  constructor(request) {
    this.request = request;
  }

  /*
   *  基础工具API
   */

  // 1、高效转链
  getTbServiceGetPrivilegeLink ({ version = 'v1.3.1', goodsId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/get-privilege-link', {
      form: { version, goodsId, ...props }
    })
  }

  // 2、官方活动会场转链
  getTbServiceActivityLink ({ version = 'v1.0.0', promotionSceneId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/activity-link', {
      form: { version, promotionSceneId, ...props }
    })
  }

  // 3、京东商品批量转链
  getContentPromotionUnionConvert ({ version = 'v1.0.0', unionId, content, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/kit/content/promotion-union-convert', {
      form: { version, unionId, content, ...props }
    })
  }

  // 4、京东链接解析
  getDelsJdKitParseUrl ({ version = 'v1.0.0', url, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/kit/parseUrl', {
      form: { version, url, ...props }
    })
  }

  // 5、商品精推素材
  getGoodsMaterialList ({ version = 'v1.0.0', id, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/material/list', {
      form: { version, id, ...props }
    })
  }

  // 6、拼多多商品转链
  getGoodsPromGenerate ({ version = 'v1.0.0', pid, goodsSign, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/pdd/kit/goods-prom-generate', {
      form: { version, pid, goodsSign, ...props }
    })
  }

  // 7、京东商品转链
  getPromotionUnionConvert ({ version = 'v1.0.0', unionId, materialId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/kit/promotion-union-convert', {
      form: { version, unionId, materialId, ...props }
    })
  }

  // 8、淘系订单查询
  getTbServiceGetOrderDetails ({ version = 'v1.0.0', queryType, endTime, startTime, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/get-order-details', {
      form: { version, queryType, endTime, startTime, ...props }
    })
  }

  // 9、淘系万能解析
  getTbServiceParseContent ({ version = 'v1.0.0', content, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/parse-content', {
      form: { version, content, ...props }
    })
  }

  // 10、淘系万能解析
  getTbServiceParseTaokouling ({ version = 'v1.0.0', content, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/parse-taokouling', {
      form: { version, content, ...props }
    })
  }

  // 11、京东订单查询
  getDelsJdOrderGetOfficialOrderList ({ version = 'v1.0.0', type, key, startTime, endTime, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/order/get-official-order-list', {
      form: { version, type, key, startTime, endTime, ...props }
    })
  }

  // 12、优惠券查询
  getDelsTaobaoKitCouponGetCouponInfo ({ version = 'v1.0.0', content, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/taobao/kit/coupon/get-coupon-info', {
      form: { version, content, ...props }
    })
  }

  // 13、超值买返商品转链
  getDelsTaobaoKitTurnLinkCzmf ({ version = 'v1.0.0', goodsId, title, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/taobao/kit/turnLink/czmf', {
      form: { version, goodsId, title, ...props }
    })
  }

  // 14、淘礼金创建
  getDelsTaobaoKitCreateTlj ({ version = 'v1.0.0', alimamaAppKey, alimamaAppSecret, name, itemId, perFace, totalNum, winNumLimit, sendStartTime, sendEndTime, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/taobao/kit/create-tlj', {
      form: { version, alimamaAppKey, alimamaAppSecret, name, itemId, perFace, totalNum, winNumLimit, sendStartTime, sendEndTime, ...props }
    })
  }

  // 15、商品评论
  getCommentGetCommentList ({ version = 'v1.0.0', id, ...props }) {
    return this.request('https://openapi.dataoke.com/api/comment/get-comment-list', {
      form: { version, id, ...props }
    })
  }

  // 16、店铺转链
  getDelsShopConvert ({ version = 'v1.0.0', id, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/shop/convert', {
      form: { version, id, ...props }
    })
  }

  // 17、淘口令转淘口令
  getTbServiceTwdToTwd ({ version = 'v1.0.0', content, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/twd-to-twd', {
      form: { version, content, ...props }
    })
  }

  // 18、首单礼金商品
  getGoodsFirstOrderGiftMoney ({ version = 'v1.0.0', pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/first-order-gift-money', {
      form: { version, pageSize, pageId, ...props }
    })
  }

  // 19、淘口令生成
  getTbServiceCreatTaokouling ({ version = 'v1.0.0', text, url, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/creat-taokouling', {
      form: { version, text, url, ...props }
    })
  }

  // 20、超级分类
  getCategoryGetSuperCategory ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/category/get-super-category', {
      form: { version, ...props }
    })
  }

  // 21、我的收藏
  getGoodsGetCollectionList ({ version = 'v1.0.1', pageId, cid, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-collection-list', {
      form: { version, pageId, cid, ...props }
    })
  }

  // 22、我发布的商品
  getGoodsGetOwnerGoods ({ version = 'v1.0.1', pageId, pageSize, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-owner-goods', {
      form: { version, pageId, pageSize, ...props }
    })
  }

  // 23、三合一红包
  getDelsMergeRedEnvelopes ({ version = 'v1.0.0', merchantType, unionId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/merge-red-envelopes', {
      form: { version, merchantType, unionId, ...props }
    })
  }

  // 24、京东一元购订单查询
  getDelsJdOrderOuterGetOrderList ({ version = 'v1.0.0', orderTimeType, startTime, endTime, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/order/outer/get-order-list', {
      form: { version, orderTimeType, startTime, endTime, ...props }
    })
  }


  /*
   *  搜索相关API
   */

  // 1、京东联盟搜索
  getDelsJdGoodsSearch ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/goods/search', {
      form: { version, ...props }
    })
  }

  // 2、拼多多联盟搜索
  getDelsJdGoodsSearch ({ version = 'v1.0.0', ...props }) {
    return this.request('', {
      form: { version, ...props }
    })
  }

  // 3、热搜榜
  getEtcSearchListHotWords ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/etc/search/list-hot-words', {
      form: { version, ...props }
    })
  }

  // 4、联想词
  getGoodsSearchSuggestion ({ version = 'v1.0.2', keyWords, type, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/search-suggestion', {
      form: { version, keyWords, type, ...props }
    })
  }

  // 5、超级搜索
  getGoodsListSuperGoods ({ version = 'v1.3.0', type, pageId, pageSize, keyWords, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/list-super-goods', {
      form: { version, type, pageId, pageSize, keyWords, ...props }
    })
  }

  // 6、大淘客搜索
  getGoodsGetDtkSearchGoods ({ version = 'v2.1.2', pageId, pageSize, keyWords, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-dtk-search-goods', {
      form: { version, pageId, pageSize, keyWords, ...props }
    })
  }

  // 7、热搜记录
  getCategoryGetTop100 ({ version = 'v1.0.1', ...props }) {
    return this.request('https://openapi.dataoke.com/api/category/get-top100', {
      form: { version, ...props }
    })
  }

  // 8、联盟搜索
  getTbServiceGetTbService ({ version = 'v2.1.0', pageNo, pageSize, keyWords, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/get-tb-service', {
      form: { version, pageNo, pageSize, keyWords, ...props }
    })
  }


  /*
   *  特色栏目API
   */

  // 1、官方活动(1元购)
  getCategoryGetTbTopicList ({ version = 'v1.2.0', pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/category/get-tb-topic-list', {
      form: { version, pageId, ...props }
    })
  }

  // 2、京东商品历史券后价
  getDelsJdStatsGoodsHistoryPriceRecords ({ version = 'v1.0.0', skuId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/stats/goods/historyPriceRecords', {
      form: { version, skuId, ...props }
    })
  }

  // 3、轮播图
  getGoodsTopicCarouseList ({ version = 'v2.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/topic/carouse-list', {
      form: { version, ...props }
    })
  }

  // 4、线报
  getDelsSpiderListTipOff ({ version = 'v4.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/spider/list-tip-off', {
      form: { version, ...props }
    })
  }

  // 5、京东大牌折扣
  getDelsJdColumnListDiscountBrand ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/column/list-discount-brand', {
      form: { version, ...props }
    })
  }

  // 6、京东9.9包邮
  getDelsJdColumnListNines ({ version = 'v1.0.0', sort, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/column/list-nines', {
      form: { version, sort, ...props }
    })
  }

  // 7、京东实时榜单
  getDelsJdColumnListRealRanks ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/column/list-real-ranks', {
      form: { version, ...props }
    })
  }

  // 8、爆品预告商品合集
  getGoodsGetHotAdvance ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-hot-advance', {
      form: { version, ...props }
    })
  }

  // 9、高佣精选
  getGoodsSinglePageListHeightCommission ({ version = 'v1.0.0', pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/singlePage/list-height-commission', {
      form: { version, pageSize, pageId, ...props }
    })
  }

  // 10、热门活动
  getGoodsActivityCatalogue ({ version = 'v1.1.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/activity/catalogue', {
      form: { version, ...props }
    })
  }

  // 11、活动商品
  getGoodsActivityGoodsList ({ version = 'v1.2.2', pageId, activityId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/activity/goods-list', {
      form: { version, pageId, activityId, ...props }
    })
  }

  // 12、精选专题
  getGoodsTopicCatalogue ({ version = 'v1.1.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/topic/catalogue', {
      form: { version, ...props }
    })
  }

  // 13、专辑列表
  getAlbumAlbumList ({ version = 'v1.0.0', albumType, ...props }) {
    return this.request('https://openapi.dataoke.com/api/album/album-list', {
      form: { version, albumType, ...props }
    })
  }

  // 14、专题商品
  getGoodsTopicGoodsList ({ version = 'v1.2.2', pageId, topicId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/topic/goods-list', {
      form: { version, pageId, topicId, ...props }
    })
  }

  // 15、单个专辑商品列表
  getAlbumGoodsList ({ version = 'v1.0.0', albumId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/album/goods-list', {
      form: { version, albumId, ...props }
    })
  }

  // 16、细分类目合集
  getSubdivisionGetList ({ version = 'v1.0.0', cid, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/subdivision/get-list', {
      form: { version, cid, pageSize, pageId, ...props }
    })
  }

  // 17、超值买返商品
  getGoodsActivityListGoodsCzmf ({ version = 'v1.0.0', sort, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/activity/list-goods-czmf', {
      form: { version, sort, pageSize, pageId, ...props }
    })
  }

  // 18、热门主播力荐商品
  getLiveGoodsList ({ version = 'v1.0.0', pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/live/goods-list', {
      form: { version, pageSize, pageId, ...props }
    })
  }

  // 19、历史新低商品合集
  getGoodsGetHistoryLowPriceList ({ version = 'v1.0.0', sort, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-history-low-price-list', {
      form: { version, sort, pageSize, pageId, ...props }
    })
  }

  // 20、单个品牌详情
  getDelanysBrandGetGoodsList ({ version = 'v1.0.0', brandId, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/delanys/brand/get-goods-list', {
      form: { version, brandId, pageSize, pageId, ...props }
    })
  }

  // 21、品牌栏目
  getDelanysBrandGetColumnList ({ version = 'v1.0.0', cid, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/delanys/brand/get-column-list', {
      form: { version, cid, pageSize, pageId, ...props }
    })
  }

  // 22、细分类目榜
  getSubdivisionGetRankList ({ version = 'v1.0.0', subdivisionId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/subdivision/get-rank-list', {
      form: { version, subdivisionId, ...props }
    })
  }

  // 23、折上折
  getGoodsSuperDiscountGoods ({ version = 'v1.0.0', sort, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/super-discount-goods', {
      form: { version, sort, pageSize, pageId, ...props }
    })
  }

  // 24、每日半价
  getGoodsGetHalfPriceDay ({ version = 'v1.1.0', sessions, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-half-price-day', {
      form: { version, sessions, ...props }
    })
  }

  // 25、淘系商品历史券后价
  getGoodsPriceTrend ({ version = 'v1.1.0', id, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/price-trend', {
      form: { version, id, ...props }
    })
  }

  // 26、直播好货
  getGoodsLiveMaterialGoodsList ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/liveMaterial-goods-list', {
      form: { version, ...props }
    })
  }

  // 27、每日爆品推荐
  getGoodsExplosiveGoodsList ({ version = 'v1.0.0', pageId, pageSize, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/explosive-goods-list', {
      form: { version, pageId, pageSize, ...props }
    })
  }

  // 28、大淘客独家券商品
  getGoodsExclusiveGoodsList ({ version = 'v1.0.0', pageId, pageSize, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/exclusive-goods-list', {
      form: { version, pageId, pageSize, ...props }
    })
  }

  // 29、9.9包邮精选
  getGoodsNineOpGoodsList ({ version = 'v2.0.0', nineCid, pageId, pageSize, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/nine/op-goods-list', {
      form: { version, nineCid, pageId, pageSize, ...props }
    })
  }

  // 30、咚咚抢
  getCategoryDdqGoodsList ({ version = 'v1.2.1', ...props }) {
    return this.request('https://openapi.dataoke.com/api/category/ddq-goods-list', {
      form: { version, ...props }
    })
  }

  // 31、各大榜单
  getGoodsGetRankingList ({ version = 'v1.3.0', rankType, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-ranking-list', {
      form: { version, rankType, ...props }
    })
  }

  // 32、朋友圈文案
  getGoodsFriendsCircleList ({ version = 'v1.3.0', pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/friends-circle-list', {
      form: { version, pageId, ...props }
    })
  }

  // 33、品牌库
  getTbServiceGetBrandList ({ version = 'v1.1.2', pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/get-brand-list', {
      form: { version, pageId, ...props }
    })
  }

  // 34、猜你喜欢
  getGoodsListSimilerGoodsByOpen ({ version = 'v1.2.2', id, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/list-similer-goods-by-open', {
      form: { version, id, ...props }
    })
  }

  // 35、京东年货节商品
  getGoodsJdOneDollarPurchase ({ version = 'v1.0.1', sort, pageSize, pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/jd-one-dollar-purchase', {
      form: { version, sort, pageSize, pageId, ...props }
    })
  }


  /*
   *  入库更新API
   */

  // 1、京东商品详情
  getDelsJdGoodsGetDetails ({ version = 'v1.0.0', skuIds, ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/goods/get-details', {
      form: { version, skuIds, ...props }
    })
  }

  // 2、商品列表
  getGoodsGetGoodsList ({ version = 'v1.2.4', pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-goods-list', {
      form: { version, pageId, ...props }
    })
  }

  // 3、单品详情
  getGoodsGetGoodsDetails ({ version = 'v1.2.3', id, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-goods-details', {
      form: { version, id, ...props }
    })
  }

  // 4、定时拉取
  getGoodsPullGoodsByTime ({ version = 'v1.2.3', pageId }) {
    return this.request('https://openapi.dataoke.com/api/goods/pull-goods-by-time', {
      form: { version, pageId }
    })
  }

  // 5、失效商品
  getGoodsGetStaleGoodsByTime ({ version = 'v1.0.1', pageId, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-stale-goods-by-time', {
      form: { version, pageId, ...props }
    })
  }

  // 6、商品更新
  getGoodsGetNewestGoods ({ version = 'v1.2.0', pageId, pageSize, ...props }) {
    return this.request('https://openapi.dataoke.com/api/goods/get-newest-goods', {
      form: { version, pageId, pageSize, ...props }
    })
  }


  // 7、京东商品类目
  getJDCategorySearch ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/jd/category/search', {
      form: { version, ...props }
    })
  }

  // 8、京东商品类目接口
  getPDDCategorySearch ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/pdd/category/search', {
      form: { version, ...props }
    })
  }

  // 8、拼多多联盟搜索
  getPDDGoodsSearch ({ version = 'v2.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/pdd/goods/search', {
      form: { version, ...props }
    })
  }

  // 淘系违规订单查询
  getFoulOrderList ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/get-foul-order-list', {
      form: { version, ...props }
    })
  }

  // 淘系维权订单查询
  getRefundOrderList ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/tb-service/get-refund-order-list', {
      form: { version, ...props }
    })
  }

  // 剪切板识别
  getKitContentParse ({ version = 'v1.0.0', ...props }) {
    return this.request('https://openapi.dataoke.com/api/dels/kit/contentParse', {
      form: { version, ...props }
    })
  }
  
  
  
}

module.exports = initService;